<?php namespace system\model;
//	框架的核心模型类	
	use hdphp\model\Model;
	
//	模型类：类型表模型
	class Goods_list extends Model{
		protected $table='goods_list';
//		类型名验证
		protected $validate=array(
			array('number','required','库存量不能为空',3,3),
		);		
		
		public function store(){
			if(!$this->create()) return false;
//			p($_POST);die;
//			数据转字符串
			sort($this->data['combine']);
			$this->data['combine']=implode('|',$this->data['combine']);
//			p($this->data);die;
			$this->add();
			return true;
		}
		
		public function edit(){
			if(!$this->create()) return false;
			$this->save();
			return ture;
		}
		

	}